package org.karson.designpattern.behavioral.observer.eventbus;

import org.karson.designpattern.behavioral.observer.eventbus.core.AsyncEventBus;
import org.karson.designpattern.behavioral.observer.eventbus.core.EventBus;

import java.util.concurrent.Executors;

public class Demo {
    public static void main(String[] args) {
        EventBus eventBus = new AsyncEventBus(Executors.newFixedThreadPool(20));
        eventBus.register(new EventBusObserverOne());
        eventBus.register(new EventBusObserverTwo());
        eventBus.post("Event");
    }
}
